#include "linuxheader.h"
#include <workflow/WFHttpServer.h>

static WFFacilities::WaitGroup  waitGrop(1);


void sigHandler(int num)
{
    waitGrop.done();
    fprintf(stderr,"waitGrop is done!\n");
}
void process(WFHttpTask * serverTask)
{

}
int main()
{
    signal(SIGINT,sigHandler);
    //创建一个服务器对象；
   WFHttpServer server(process);
   if(server.start(1234)==0)
   {
    waitGrop.wait();
    server.stop();
   }
   else{
    fprintf(stderr,"server faild");
    return -1;
   }
   retunrn 0;
}